home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 30
/
Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso
/
Aminet
/
misc
/
math
/
MathFX_src.lha
/
icnvrt.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-12-20
|
787b
|
50 lines
/* Coordinate transformations for plotting package */
/* Convertion routines yielding an integer result */
#include "mathfx.h"
#include "declare.h"
/* dcpc. converts device coordinates to physical coordinates */
int dcpcx(x)
float x;
{
return(round(dpxoff + dpxscl * x));
}
int dcpcy(y)
float y;
{
return(round(dpyoff + dpyscl * y));
}
/* mmpc. converts millimetres from bottom left-hand corner to physical */
/* coordinates */
int mmpcx(x)
float x;
{
return(round(mpxoff + mpxscl * x));
}
int mmpcy(y)
float y;
{
return(round(mpyoff + mpyscl * y));
}
/* wcpc. converts world coordinates to physical coordinates */
int wcpcx(x)
float x;
{
return(round(wpxoff + wpxscl * x));
}
int wcpcy(y)
float y;
{
return(round(wpyoff + wpyscl * y));
}